<?php

declare (strict_types=1);


namespace app\admin\controller;

use addons\Builder\facade\Builder;

/**
 * 服务内容
 */
class Service extends Base
{
    //主键，默认为id
    protected string $pk = 'id';

    //主模型
    protected string $model = '\app\common\model\Service';

    public function index(): string
    {
        return Builder::Table()
            ->autoStructure($this->model, $this->pk, 'barDemo,200')
            ->addRightButtons(['edit' => ['size' => '60%'], 'delete'])
            ->addTopButtons(['add' => ['size' => '60%']])
            ->addSearch([
                ['title', '输入标题', 'input,Like']
            ])
            ->fetch();
    }
}